package com.interview.rtc.aigc.utils;


import com.volcengine.model.ApiInfo;
import com.volcengine.model.Credentials;
import com.volcengine.model.ServiceInfo;
import org.apache.http.Header;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicHeader;
import org.apache.http.message.BasicNameValuePair;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

public class AIGCConfig {
    public static ServiceInfo serviceInfo = new ServiceInfo(new HashMap<String, Object>() {
        {
            this.put("ConnectionTimeout", 5000);
            this.put("SocketTimeout", 5000);
            this.put("Host", "open.volcengineapi.com");
            this.put("Header", new ArrayList<Header>() {
                {
                    this.add(new BasicHeader("Accept", "application/json"));
                }
            });
            this.put("Credentials", new Credentials("cn-north-1", "rtc"));
        }
    });
    public static Map<String, ApiInfo> apiInfoList = new HashMap<String, ApiInfo>() {
        {
            this.put("StartVoiceChat", new ApiInfo(new HashMap<String, Object>() {
                {
                    this.put("Method", "POST");
                    this.put("Path", "/");
                    this.put("Query", new ArrayList<NameValuePair>() {
                        {
                            this.add(new BasicNameValuePair("Action", "StartVoiceChat"));
                            this.add(new BasicNameValuePair("Version", "2024-12-01"));
                        }
                    });
                }
            }));
            this.put("StopVoiceChat", new ApiInfo(new HashMap<String, Object>() {
                {
                    this.put("Method", "POST");
                    this.put("Path", "/");
                    this.put("Query", new ArrayList<NameValuePair>() {
                        {
                            this.add(new BasicNameValuePair("Action", "StopVoiceChat"));
                            this.add(new BasicNameValuePair("Version", "2024-12-01"));
                        }
                    });
                }
            }));
        }
    };

    public AIGCConfig() {
    }
}
